package com.boco.transnms.common.dto.traph;

import com.boco.transnms.common.dto.base.GenericDO;
import java.util.Map;
import java.util.HashMap;
import com.boco.transnms.common.dto.base.DboBlob;

/**
 * <p>Title: TransNMS</p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2006</p>
 *
 * <p>Company: Boco Inter-Telecom INC</p>
 *
 * @author not attributable
 * @version 1.0
 */
public class DevOpenSheetFile extends GenericDO{
    public static final String CLASS_NAME="DEV_OPEN_SHEET_FILE";

    public static class AttrName{
        public static final String Cuid = "CUID";
        public static final String RelatedDistrictCuid = "RELATED_DISTRICT_CUID";
        public static final String Period = "PERIOD";
        public static final String FileName = "FILE_NAME";
        public static final String FileData = "FILE_DATA";
    }

    private final Map<String, Class> attrTypeMap = new HashMap();

    public DevOpenSheetFile() {
        super(CLASS_NAME);
        initAttrTypes();
    }

    @Override
	public Class getAttrType(String attrName) {
        return attrTypeMap.get(attrName);
    }

    @Override
	public String[] getAllAttrNames() {
        String[] attrNames = new String[attrTypeMap.size()];
        attrTypeMap.keySet().toArray(attrNames);
        return attrNames;
    }

    protected void initAttrTypes() {
        attrTypeMap.put(AttrName.Cuid , String.class);
        attrTypeMap.put(AttrName.RelatedDistrictCuid , String.class);
        attrTypeMap.put(AttrName.Period , String.class);
        attrTypeMap.put(AttrName.FileName , String.class);
        attrTypeMap.put(AttrName.FileData , DboBlob.class );
    }

    @Override
	public void setCuid(String varString) {
        this.setAttrValue(AttrName.Cuid ,varString);
    }

    @Override
	public String getCuid() {
        return this.getAttrString(AttrName.Cuid);
    }

    public void setRelatedDistrictCuid(String varString) {
        this.setAttrValue(AttrName.RelatedDistrictCuid ,varString);
    }

    public String getRelatedDistrictCuid() {
        return this.getAttrString(AttrName.RelatedDistrictCuid );
    }

    public void setPeriod(String varString) {
        this.setAttrValue(AttrName.Period,varString);
    }

    public String getPeriod() {
        return this.getAttrString(AttrName.Period);
    }

    public void setFileName(String varString) {
        this.setAttrValue(AttrName.FileName,varString);
    }

    public String getFileName() {
        return this.getAttrString(AttrName.FileName);
    }

    public void setFileData(DboBlob data) {
        this.setAttrValue(AttrName.FileData,data);
    }

    public DboBlob getFileData() {
        return this.getAttrBlob(AttrName.FileData);
    }
}
